package com.demo.rabbitmq.config;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public enum FanoutExchangeEnum {
    FANOUT_EXCHANGE("fanout_exchange"),
    ;

    private final String exchangeName;

    FanoutExchangeEnum(String exchangeName) {
        this.exchangeName = exchangeName;
    }

    public String getExchangeName() {
        return exchangeName;
    }

    public static List<String> toList() {
        return Arrays.stream(FanoutExchangeEnum.values())
                .map(exchangeEnum -> exchangeEnum.name().toLowerCase())
                .collect(Collectors.toList());
    }
}
